public class Chapter03 {
    public static void main(String[] args) {
        double h = 10;
        double s = 0;
        int a = 0;
        for (;;){
            h*=0.8;
            s=s+h*2;
            a++;
            if(h<0.01)
                break;
        }
        System.out.println(s+10+" "+a);
    }
}
